<template>
  <div class="person-tip" @click="toTip">
      <div class="item-img" v-bind:style="{backgroundImage:'url('+thumb+')'}"></div>
      <div class="item-content">
          <div class="item-name">{{name}}</div>
          <div class="item-info" v-if="info">{{info}}</div>
      </div>
  </div>
</template>

<script>
export default {
  name: 'person-tip',
  comments: 'person-tip',
  props: {
    tipId: String,
    thumb: String,
    name: String,
    desc: String,
    info: Number,
    url: String
  },
  data () {
    return {
    }
  },
  methods: {
    toTip: function () {
      this.$router.push({
        path: this.url,
        params: {
        }
      })
    }
  }
}
</script>
<style lang="postcss" scoped>
.person-tip{
    height: 50px;
    width: 100%;
    background-color: #333;
    position: relative;
    border-bottom: 1px solid #666;
    overflow: hidden;
}
.item-img{
    height: 30px;
    width: 30px;
    position: absolute;
    border-radius: 50%;
    background-repeat: no-repea;
    background-size: 100%;
    left: 5%;
    top: 10px;
}
.item-content{
    position: absolute;
    top: 0px;
    left: 20%;
    text-align: left;
    height: 100%;
    width: 75%;
    color: #f8f8f8;
}
.item-name{
    margin-top: 10px;
    font-weight: bold;
    float: left;
}
.item-info{
    margin-top: 10px;
    font-weight: bold;
    float: right;
    background-color: #f44;
    width: 22px;
    font-size: 16px;
    color: #eee;
    text-align: center;
    border-radius: 50%;
}
.item-desc{
    font-size: 0.8rem;
    text-align: left;
    margin-top: 0px;
    color: #fff
}
</style>
